<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta name="renderer" content="webkit">
    <title><?php echo ($title); ?></title>
    <link rel="stylesheet" href="/Public/web/css/pintuer.css">
    <link rel="stylesheet" href="/Public/web/css/admin.css">
    <script src="/Public/web/js/jquery.js"></script>
    <script src="/Public/web/js/pintuer.js"></script>
</head>


<body>
  <div class="panel admin-panel margin-top">
    <div class="panel-head" id="add"><strong><span class="icon-pencil-square-o"></span> <?php echo L("tianjia");?>/<?php echo L("bianji");?></strong></div>
    <div class="body-content">
      <form method="post" class="form-x" action="" enctype="multipart/form-data">
        <div class="form-group">
          <div class="label">
            <label><?php echo L("canzhuoleixing");?>：</label>
          </div>
          <div class="field">
            <input type="text" class="input w50" name="table_cate_name" value="<?php echo ($info['table_cate_name']); ?>" data-validate="required:<?php echo L('qingshuru'); echo L('canzhuoleixing');?>"/>
            <div class="tipss">如:小桌</div>
          </div>
        </div>
        <div class="form-group">
          <div class="label">
            <label><?php echo L("kezuorenshu");?>：</label>
          </div>
          <div class="field">
            <input type="text" class="input w50" name="sit_people" value="<?php echo ($info['sit_people']); ?>"/>
            <div class="tipss">如:1-4（表示可坐1-4人）</div>
          </div>
        </div>

        <div class="form-group">
          <div class="label">
            <label></label>
          </div>
          <div class="field">
            <button class="button bg-main icon-check-square-o" type="submit"> <?php echo L("tijiao");?></button>
          </div>
        </div>

      </form>
    </div>
  </div>
</body>
<script type="text/javascript">
//          $(document).ready(function(){
//            $("select[name='goods_type']").change(function(){
//              var typeon = $("select[name='goods_type']").val();
//              if(typeon==1){$("#mytype").show();}
//              else{$("#mytype").hide();$("#mytypeitem").hide();}
//            });
//
//            $(".mya1").click(function(){
//              var html = '<div class="form-group"> ';
//              html += '<div class="label"><label></label></div>';
//              html += '<div class="field"> ';
//              html += '<input type="text" class="Father_Title input w50" name="spec_name[]" placeholder="<?php echo L("guigemingchen");?>" data-validate="required: " />　';
//              html += ' <input type="text" class="input w50 check_item" name="item_name[]" placeholder="<?php echo L("guigeshuxing");?>" data-validate="required: " />　';
//              html += ' <a href="javascript:void(0)" class="mya1 button bg-red" onclick="itemdel(this)"><?php echo L("shanchuguige");?></a>';
//              html += '</div></div>';
//
//              $("#mytype").append(html);
//            });
//          });

  function preview(file)
  {
    var prevDiv = document.getElementById('preview');
    if (file.files && file.files[0])
    {
      var reader = new FileReader();
      reader.onload = function(evt){
        prevDiv.innerHTML = '<img src="' + evt.target.result + '" width="100%" />';
      }
      reader.readAsDataURL(file.files[0]);
    }
    else
    {
      prevDiv.innerHTML = '<div class="img" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale,src=\'' + file.value + '\'"></div>';
    }
  }
  //单个删除
  function del(id,goods_id,t){
    if(confirm("<?php echo L('shanchuxiaoxi');?>")){
      var url = "<?php echo U('goods/delpic');?>";
      $.getJSON(url,{id:id,goods_id:goods_id},function (data){
        if(data.result=="true1"){$(t).remove();}
        else if(data.result=="true2"){$(t).next('input[type=hidden]').remove();$(t).remove();}
      })
    }
  }
  function itemdel(t){
    $(t).parents('.form-group').remove();
  }
  //生成表格
  function refreshOptions(){
    $("#mytypeitem").show();
    step.Creat_Table();
  }
</script>
</html>